package com.koala.learn.excellearn.entity;

import com.alibaba.excel.annotation.ExcelProperty;
import lombok.Data;

import java.time.LocalDateTime;

/**
 * excel 导出学生表
 *
 * @author yantingrui
 * @date 2021/12/27   17:29
 */


@Data
public class Student {

    @ExcelProperty("name")
    private String name;

    @ExcelProperty(value = "age", converter = AgeConvert.class)
    private Integer age;

    //@ExcelProperty(value = "birthday",converter = LocalDateTimeStringConverter.class)
    @ExcelProperty(value = "birthday")
    private LocalDateTime birthday;


    public Student(String name, Integer age) {
        this.name = name;
        this.age = age;
    }

    public Student(String name, Integer age, LocalDateTime birthday) {
        this.name = name;
        this.age = age;
        this.birthday = birthday;
    }

    public Student() {
    }
}
